package com.dmatek.uwb.util.tool;

import java.text.SimpleDateFormat;
import java.util.Date;
/***
 * 字符串工具
 * @author zhangfu
 * @data 2019年6月22日 下午3:04:17
 * @Description
 */
public final class StringUtil {
	// private final static SimpleDateFormat dataFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	protected static final ThreadLocal<SimpleDateFormat> simpleThreadLocal = new ThreadLocal<SimpleDateFormat>() {
		@Override
		protected SimpleDateFormat initialValue() {
			return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		}
	};
	public static boolean isEmpty(String str) {
		return (null == str || "".equals(str))?true:false;
	}
	public static String dateToString(Date date) {
		return simpleThreadLocal.get().format(date);
	}
}
